<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'assess.label', default: 'Assess')}" />
    <title>项目详情</title>
</head>
<body>
<div class="small-header transition animated fadeIn">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>项目详情</span>
                    </li>
                </ol>
            </div>
            <h2 class="font-light m-b-xs">

            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
                <div class="panel-body form-horizontal">
                    <div class="row">
                        <div class="hpanel hgreen" style="">
                            <div class="panel-heading">
                                <div class="panel-tools">

                                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                                </div>
                                项目详情
                            </div>
                            <div class="panel-body">
                                <div class="col-md-12 text-center">
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs text-center">

                                            <span class="">${developerProject?.name}</span>
                                            %{--<small class="newFontSize">万元</small>--}%
                                        </h3>
                                    </div>
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs text-center">
                                            <small style="font-size: 16px;">城市 :</small>
                                            <small style="font-size: 16px;">${developerProject?.city?.name}</small>
                                            %{--<small class="newFontSize">万元</small>--}%
                                        </h3>
                                    </div>
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs">
                                            <small style="font-size: 16px;">项目地址 : </small>
                                            <small style="font-size: 16px;">${developerProject?.address}</small>
                                            %{--<small class="newFontSize">元/平方米</small>--}%
                                        </h3>
                                    </div>
                                    <div class="col-md-3">
                                            <h3 class="font-extra-bold m-b-xs text-center">
                                                <small style="font-size: 16px;">入围状态 : </small>
                                                <small style="font-size: 16px;">${developerProject?.entryStatus}</small>
                                            </h3>
                                        </div>
                                <div class="col-md-12 text-center">
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs text-center">

                                        </h3>
                                    </div>
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs">
                                            <small style="font-size: 16px;">建筑类别 : </small>
                                            <small style="font-size: 16px;">${developerProject?.buildingstructure}</small>
                                            %{--<small class="newFontSize">元/平方米</small>--}%
                                        </h3>
                                    </div>
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs">
                                            <small style="font-size: 16px;">交房时间 : </small>
                                            <small style="font-size: 16px;">${developerProject?.deliveryDate.toString().substring(0,10)}</small>
                                            %{--<small class="newFontSize"></small>--}%
                                        </h3>
                                    </div>
                                    <div class="col-md-3">
                                        <h3 class="font-extra-bold m-b-xs">
                                            <small style="font-size: 16px;">竣工验收 : </small>
                                            <small style="font-size: 16px;">${developerProject?.completionDate.toString().substring(0,10)}</small>
                                            <small class="newFontSize"></small>
                                        </h3>
                                    </div>

                                </div>
                                </div>
                            </div>
                        </div>
                    </div>
            </div>


        <div class="hpanel hgreen">
            <div class="panel-heading">
                开发商楼盘列表
            </div>

            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="esateTable">
                        <thead>
                        <tr>

                            <g:sortableColumn property="externalId" title="楼盘名称"   params="${params}"/>
                            <g:sortableColumn property="batch" title="楼盘地址"   params="${params}"/>
                            <g:sortableColumn property="buildingType" title="占地面积(平方米)"    params="${params}"/>
                            <g:sortableColumn property="estateStatus" title="总建筑面积(平方米)"   params="${params}"/>
                            <g:sortableColumn property="name" title="资质证书编号"    params="${params}"/>
                            <g:sortableColumn property="city" title="用途性质"    params="${params}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${developerProject?.buildings}">
                        <tr>
                            <td><g:link controller="developer" action="buildingDetail" id="${it?.id}">${it?.name}</g:link></td>
                            <td>${it?.address}</td>
                            <td>${it?.coveringArea}</td>
                            <td>${it?.totalBuildingArea}</td>
                            <td>${it?.certificateNumber}</td>
                            <td>住宅</td>
                        </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="panel-footer">
                <div class="pagination">
                    <g:paginate total="${developerProject?.buildings.size() ?: 0}" params="${params}"/>
                </div>
            </div>
        </div>
    </div>

    <g:javascript>
        $(function () {

            $('#datepicker').datepicker({
                language: 'zh-CN'
            });
            $("#datepicker").on("changeDate", function(event) {
                $("#my_hidden_input").val(
                        $("#datepicker").datepicker('getFormattedDate')
                )
            });
            $("#city").bind("change", function(){
            if('${params.district}'== $("#district option:selected").val()&&flag!=true && '${params.district}' != '-1'){
                flag=true
                return
            }
            $("#district option").remove();
            $("#s2id_district span:first").html("请选择行政区");
            var city = $("#city").val()
            $("#district").append("<option value='-1' >请选择行政区</option>")
            if(city=='-1'){
                return
            }
            $.ajax({
                url: "/estate/districtList",
                type: "POST",
                data: {'city': city} ,
                success: function(result){
                    for(var i=0; i < result.districtList.length; i++){
                        $("#district").append("<option value=" + result.districtList[i].zoneNumber + ">" + result.districtList[i].name + "</option>")
                    }
                }
            });
        });
        $("#city").change();
        });
    </g:javascript>
</body>
</html>